<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/jquery-3.4.1.js" type="text/javascript" charset="UTF-8"></script>

    <script type="text/javascript">
        //  console.log($("#p1"));

        $(function () {
            console.log("ready加载事件...");
        });

        $(document).ready(function () {
            //获取元素
            console.log($("#p1"));
        });
    </script>
</head>

<body>
    <p id="p1">文本</p>
</body>

</html>